home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
dfue
/
elcheapofax
/
faxcmd
/
libfax
/
rcs
/
msgs.c,v
< prev
next >
Wrap
Text File
|
1995-03-09
|
4KB
|
240 lines
head 1.2;
access;
symbols
OCT93:1.2;
locks;
comment @ * @;
1.2
date 93.06.11.16.15.25; author Rhialto; state Exp;
branches;
next 1.1;
1.1
date 93.06.11.15.19.27; author Rhialto; state Exp;
branches;
next ;
desc
@Give readable interpretation of several magic numbers
@
1.2
log
@First real RCS checkin
@
text
@/* $Id$
* $Log$
*/
/*
* This file is part of El Cheapo Fax. All modifications relative to the
* base source are (C) Copyright 1993 by Olaf 'Rhialto' Seibert.
* All rights reserved. The GNU General Public License applies.
*/
/*
This file is part of the NetFax system.
(c) Copyright 1989 by David M. Siegel and Sundar Narasimhan.
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include "c2proto.h"
#include "msgs.h"
static char *modem_result_strings[] = {
"ok", "connect", "ring", "no carrier", "error", "no dialtone", "busy",
"no answer",
};
char *hayes_result_msg(result)
int result;
{
if (result < 0 || result > 8)
return ("unknown");
else
return (modem_result_strings[result]);
}
char *faxmodem_result_msg(f)
FaxModem *f;
{
return (hayes_result_msg(f->result));
}
void faxmodem_print_id_strings(f, fp)
FaxModem *f;
FILE *fp;
{
if (FAX_ISSET(f, FAX_F_FTSI))
fprintf(fp, "tsi: %s\n", f->ftsi_id);
if (FAX_ISSET(f, FAX_F_FCSI))
fprintf(fp, "csi: %s\n", f->fcsi_id);
if (FAX_ISSET(f, FAX_F_FCIG))
fprintf(fp, "cig: %s\n", f->fcig_id);
}
char *t30_vr_string(p)
T30params *p;
{
switch (p->vr) {
case VR_NORMAL:
return ("normal");
case VR_FINE:
return ("fine");
default:
return ("unknown");
}
}
char *t30_br_string(p)
T30params *p;
{
switch (p->br) {
case BR_2400:
return ("2400");
case BR_4800:
return ("4800");
case BR_7200:
return ("7200");
case BR_9600:
return ("9600");
case BR_12000:
return ("12000");
case BR_14400:
return ("14400");
default:
return ("unknown");
}
}
char *t30_wd_string(p)
T30params *p;
{
switch (p->wd) {
case WD_1728:
return ("215");
case WD_2048:
return ("255");
case WD_2432:
return ("303");
case WD_1216:
return ("151");
case WD_864:
return ("107");
default:
return ("unknown");
}
}
char *t30_ln_string(p)
T30params *p;
{
switch (p->ln) {
case LN_A4:
return ("A4");
case LN_B4:
return ("B4");
case LN_UNLIMITED:
return ("unlimited");
default:
return ("unknown");
}
}
char *t30_df_string(p)
T30params *p;
{
switch (p->df) {
case DF_1DHUFFMAN:
return ("1D huffman");
case DF_2DMREAD:
return ("2D read");
case DF_2DUNCOMP:
return ("2D uncompressed");
default:
return ("unknown");
}
}
char *t30_ec_string(p)
T30params *p;
{
switch (p->ec) {
case EC_DA_ECM:
return ("disabled");
case EC_EN_ECM_64:
return ("ECM 64");
case EC_EN_ECM_256:
return ("ECM_256");
default:
return ("unknown");
}
}
char *t30_bf_string(p)
T30params *p;
{
switch(p->bf) {
case BF_DISABLED:
return ("disabled");
case BF_ENABLED:
return ("enabled");
default:
return ("unknown");
}
}
char *t30_st_string(p)
T30params *p;
{
switch(p->st) {
case ST_0:
return("N-0 F-0");
case ST_1:
return("N-5 F-5");
case ST_2:
return("N-10 F-5");
case ST_3:
return("N-10 F-10");
case ST_4:
return("N-20 F-10");
case ST_5:
return("N-20 F-20");
case ST_6:
return("N-40 F-20");
case ST_7:
return("N-40 F-40");
default:
return ("unknown");
}
}
@
1.1
log
@Initial revision
@
text
@d1 3
@